<template>
  <div
    v-if="detailData"
    class="print-view"
  >
    <div
      class="title"
      style="display:flex;justify-content:center;"
    >
      <p style="font-size: 16px; font-weight: 600;">{{ detailData.template_name||'项目立项申请审批表' }}</p>
    </div>
    <table
      class="table"
      border="1px"
      cellspacing="0px"
      cellpadding="10px"
      width="100%"
      style="table-layout:fixed;"
    >
      <tr>
        <th
          rowspan="6"
          width="24px"
        >项目概况</th>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >项目编号</td>
        <td colspan="3">{{ detailData.project_no||'无' }}</td>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >项目名称</td>
        <td colspan="4">{{ detailData.project_name||'无' }}</td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >剂型及规格</td>
        <td colspan="3">{{ detailData.dosage_norms||'无' }}</td>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >申报类别</td>
        <td colspan="4">{{ detailData.apply_type||'无' }}</td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >药物类别</td>
        <td colspan="8">{{ detailData.medical_type||'无' }}</td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >药物成分</td>
        <td colspan="8">{{ detailData.medical_ingredient||'无' }}</td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >项目来源</td>
        <td colspan="3">{{ detailData.project_source||'无' }}</td>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >项目质量标准来源</td>
        <td colspan="4">{{ detailData.quality_source||'无' }}</td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >项目目标</td>
        <td colspan="8">{{ detailData.project_goal||'无' }}</td>
      </tr>
      <tr>
        <th
          rowspan="3"
          width="24px"
        >审核和批准</th>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >立项申请人</td>
        <td colspan="4">
          <div style="min-width: 240px;display:flex;flex-direction: column;">
            <!-- <span>{{detailData.apply_advice}}</span> -->
            <p style="height: 60px;">申请建议：{{ detailData.apply_advice || '无' }}</p>
            <p style="text-align:right;margin-bottom: 10px;"><span>签字：{{ detailData.creator_name }}</span></p>
            <p style="text-align:right;">{{ detailData.created_at?parseTime(detailData.created_at, "{y}年{m}月{d}日"):'' }}</p>
          </div>
        </td>
        <td colspan="4">
          <div style="min-width: 200px;display:flex;flex-direction: column;">
            <!-- <span>{{detailData.treatment}}</span> -->
            <p style="height: 60px;"><span>制剂规格建议：</span><span v-if="detailData.suggest_people">{{ detailData.suggest_people.remark || '无' }}</span></p>
            <p
              v-if="detailData.suggest_people"
              style="text-align:right;margin-bottom: 10px;"
            ><span>签字：</span><span style="display: inline-block;">{{ detailData.suggest_people.name||'无' }}</span></p>
            <p
              v-if="detailData.suggest_people"
              style="text-align:right;"
            >{{ detailData.suggest_people.date_time?parseTime(detailData.suggest_people.date_time, "{y}年{m}月{d}日"):'' }}</p>
          </div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >分管副总审核</td>
        <td colspan="8">
          <div>
            <p style="height: 60px;"><span>审核意见（含对项目分配的建议）：</span><span v-if="detailData.charge_people">{{ detailData.charge_people.remark || '无' }}</span></p>
            <p
              v-if="detailData.charge_people"
              style="text-align:right;margin-bottom: 10px;"
            ><span>签字：</span><span style="display: inline-block;">{{ detailData.charge_people.name||'无' }}</span></p>
            <p
              v-if="detailData.charge_people"
              style="text-align:right;"
            >{{ detailData.charge_people.date_time?parseTime(detailData.charge_people.date_time, "{y}年{m}月{d}日"):'' }}</p>
          </div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >总经理批准</td>
        <td colspan="8">
          <div>
            <p style="height: 60px;"><span>批准意见：</span><span v-if="detailData.manager_people">{{ detailData.manager_people.remark || '无' }}</span></p>
            <p
              v-if="detailData.manager_people"
              style="text-align:right;margin-bottom: 10px;"
            ><span>签字：</span><span style="display: inline-block;">{{ detailData.manager_people.name||'无' }}</span></p>
            <p
              v-if="detailData.manager_people"
              style="text-align:right;"
            >{{ detailData.manager_people.date_time?parseTime(detailData.manager_people.date_time, "{y}年{m}月{d}日"):'' }}</p>
          </div>
        </td>
      </tr>
      <tr>
        <th
          colspan="1"
          width="24px"
        >变更事项</th>
        <td colspan="9">
          <div style="min-height: 170px;display:flex;align-items:center;" />
        </td>
      </tr>
      <tr>
        <th
          rowspan="12"
          width="24px"
          valign="center"
        >项目可行性分析</th>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >国外情况（上市、临床、研究资料等）</td>
        <td colspan="8">
          <div style="min-height: 150px;display:flex;align-items:center;">{{ detailData.abroad_research||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >国内情况（申报和批准等）</td>
        <td colspan="8">
          <div style="min-height: 150px;display:flex;align-items:center;">{{ detailData.internal_research||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >市场分析</td>
        <td colspan="8">
          <div style="min-height: 140px;display:flex;align-items:center;">{{ detailData.market_analysis||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >预算金额（含临床前支出预算、临床支出预算）</td>
        <td colspan="8">
          <div style="min-height: 140px;display:flex;align-items:center;">临床前支出预算：{{ detailData.budget_before||'无' }}，临床支出预算：{{ detailData.budget||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >完成目标</td>
        <td colspan="8">
          <div style="min-height: 140px;display:flex;align-items:center;">{{ detailData.project_goal||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >功能主治</td>
        <td colspan="8">
          <div style="min-height: 90px;display:flex;align-items:center;">{{ detailData.function_attending||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >用法用量</td>
        <td colspan="8">
          <div style="min-height: 80px;display:flex;align-items:center;">{{ detailData.usage_num||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >疗程</td>
        <td colspan="8">
          <div style="min-height: 100px;display:flex;align-items:center;">{{ detailData.treatment||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >对照药/对照品情况</td>
        <td colspan="8">
          <div style="min-height: 100px;display:flex;align-items:center;">{{ detailData.contrast_medical_info||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >产权（依现行法规为依据）</td>
        <td colspan="8">
          <div style="min-height: 100px;display:flex;align-items:center;">{{ detailData.equity||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >项目优势</td>
        <td colspan="8">
          <div style="min-height: 100px;display:flex;align-items:center;">{{ detailData.project_advantage||'无' }}</div>
        </td>
      </tr>
      <tr>
        <td
          colspan="1"
          class="title-td"
          style="width:100px"
        >注意</td>
        <td colspan="8">
          <div style="min-height: 100px;display:flex;align-items:center;">{{ detailData.notice||'无' }}</div>
        </td>
      </tr>
      <tr>
        <th
          colspan="1"
          width="24px"
        >备注</th>
        <td colspan="9">
          <div style="min-height: 50px;display:flex;align-items:center;">{{ detailData.remark||'无' }}</div>
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  props: {
    detailData: {
      type: Object,
      default: () => {}
    }
  }
}
</script>

<style lang="scss" scoped>
@import "../../../assets/scss/views/print/approvalPrint.scss";
</style>
